package com.jyxd.web.data.czhisdata;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 检查/检验实体
 */
@Entity
@Table(name = "table_report")
@Data
public class Report implements Serializable {

    /**
     * 序列
     */
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Id
    @Column(name = "id", length = 32, nullable = false)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
    private String id;

    /**
     * 病人主键id
     */
    @Column(name = "patient_id")
    private String patientId;

    /**
     * 送检科室代码
     */
    @Column(name = "department_code")
    private String departmentCode;

    /**
     * 送检病区代码
     */
    @Column(name = "ward_code")
    private String wardCode;

    /**
     * 报告单号
     */
    @Column(name = "report_number")
    private String reportNumber;

    /**
     * 申请单号
     */
    @Column(name = "apply_no")
    private String applyNo;

    /**
     * 报告类别（1 检查/ 2 检验）
     */
    @Column(name = "report_class")
    private String reportClass;

    /**
     * 危急值标志
     */
    @Column(name = "abnormal_flag")
    private String abnormalFlag;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "creat_time")
    private Date creatTime;

    /**
     * 报告路径
     */
    @Column(name = "report_url")
    private String reportURL;

    /**
     * 报告类型名称
     */
    @Column(name = "report_type_name")
    private String reportTypeName;

    /**
     * 状态
     */
    @Column(name = "status")
    private Integer status;

}
